home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / blendToolScript.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.0 KB  |  102 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  14 January 1999
  22. // Author:         sw
  23. //
  24. //
  25. //  Procedure Name:
  26. //      blendToolScript
  27. //
  28. //  Input Arguments:
  29. //      what is going to happen when this script is called
  30. //        $setToTool = 0 ==> do the command
  31. //        $setToTool = 1 ==> show option box
  32. //        $setToTool = 2 ==> return the command
  33. //        $setToTool = 3 ==> show tool option box
  34. //        $setToTool = 4 ==> enter the tool
  35. //
  36. //  Return Value:
  37. //      None.
  38. //
  39.  
  40. proc createBlendContext ()
  41. {
  42.     if( ! `scriptCtx -exists blendContext` ) {
  43.         
  44.         scriptCtx
  45.             -i1 "blendSurface.xpm"
  46.             -bcn "blend"
  47.  
  48.             -title "Fillet Blend Tool"
  49.             -toolCursorType  "edit"
  50.             -totalSelectionSets 2
  51.             -cumulativeLists false
  52.             -showManipulators true
  53.             -expandSelectionList true
  54.             -exitUponCompletion true
  55.             -fcs ("performBlendGiven $Selection1 $Selection2")
  56.  
  57.             -setNoSelectionPrompt ("Select surface curves for the left edge.")
  58.             -setSelectionPrompt ("Select additional surface curves for " +
  59.                                  "the left edge or press ENTER to start " +
  60.                                  "the right edge selection.")
  61.                                     
  62.             -setAutoToggleSelection true
  63.             -setAutoComplete false
  64.             -setSelectionCount 0
  65.             -isoparm true
  66.             -curveOnSurface true
  67.             -surfaceEdge true
  68.  
  69.             -setNoSelectionPrompt "Select surface curves for the right edge."
  70.             -setSelectionPrompt ("Select additional surface curves " +
  71.                                  "for the right edge or press " +
  72.                                  "ENTER to compute blend.")
  73.  
  74.             -setAutoToggleSelection true
  75.             -setAutoComplete false
  76.             -setSelectionCount 0
  77.             -isoparm true
  78.             -curveOnSurface true
  79.             -surfaceEdge true
  80.  
  81.             blendContext;
  82.     }
  83. }
  84.  
  85. global proc string blendToolScript( int $setToTool )
  86. //
  87. //    Description :
  88. //        $setToTool = 0 ==> do the command
  89. //        $setToTool = 1 ==> show option box
  90. //        $setToTool = 2 ==> return the command
  91. //        $setToTool = 3 ==> show tool option box
  92. //        $setToTool = 4 ==> enter the tool
  93. {
  94.     string $tool = "";
  95.     if( $setToTool > 2 ) {
  96.         createBlendContext;
  97.         $tool = "blendContext";
  98.     }
  99.     return scriptToolScript( "performBlend", $setToTool, $tool );
  100.                              
  101. }
  102.